﻿@model Customer
@{
    ViewBag.Title = "Register";
}

<h2>Edit your profile.</h2>

@using (Html.BeginForm("Edit", "Account", 
    FormMethod.Post, new {enctype="multipart/form-data", @class = "form-horizontal", role = "form" }))
{
    @Html.ValidationSummary()
    
    <div class="form-group">
        @Html.LabelFor(m => m.Id, new { @class = "col-md-2 control-label" })
        <div class="col-md-10">
            @Html.TextBoxFor(m => m.Id, new { @class = "form-control", @readonly=true })
        </div>
    </div>
    
    @Html.HiddenFor(m => m.Password)
    
    <div class="form-group">
        @Html.LabelFor(m => m.Fullname, new { @class = "col-md-2 control-label" })
        <div class="col-md-10">
            @Html.TextBoxFor(m => m.Fullname, new { @class = "form-control" })
        </div>
    </div>
    
    <div class="form-group">
        @Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" })
        <div class="col-md-10">
            @Html.TextBoxFor(m => m.Email, new { @class = "form-control" })
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-2"></div>
        <div class="col-md-10">
            <img src="~/Images/Customers/@Model.Photo?@Guid.NewGuid()" />
        </div>
    </div>
    <div class="form-group">
        @Html.LabelFor(m => m.Photo, new { @class = "col-md-2 control-label" })
        <div class="col-md-10">
            <input type="file" name="upPhoto" />
            @Html.HiddenFor(m => m.Photo)
        </div>
    </div>
    
    @Html.HiddenFor(m => m.Activated)
    
    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <input type="submit" class="btn btn-default" value="Update" />
        </div>
    </div>
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
